<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //在JS中括号代表数组，{}代表对象
        // var  array = [  "zs", 1,  true,  [],  {}]
            var array = ["zs", "ls", "wu", "zl"];


            // array[0] = "aa";
            // array[40] = "aa";

            array["aa"] = "aa"

            console.log(array)
            console.log(array.length)


            for (var i = 0; i < array.length; i++) {
                console.log(array[i])
            }
        
        // js: {}代表对象
        var user = {
            name: "zs",
            age: 18
        }

        // user.name = "ls"
        // console.log(user.name)

        // user.address = "wu";
        user["address"] = "wu";
        console.log(user)
        console.log(user["name"])
    </script>
</body>
</html>